package models

import (
	"time"
)

type Scheduletask struct {
	Id int64 `xorm:"oid"`

	Name                string    `json:"Name" xorm:"not null VARCHAR"`
	Seconds             int       `json:"Seconds" xorm:"not null INTEGER"`
	Type                string    `json:"Type" xorm:"not null VARCHAR"`
	Enabled             int       `json:"Enabled" xorm:"not null BIT(1)"`
	Stoponerror         int       `json:"StopOnError" xorm:"not null BIT(1)"`
	Leasedbymachinename string    `json:"LeasedByMachineName" xorm:"VARCHAR"`
	Leaseduntilutc      time.Time `json:"LeasedUntilUtc" xorm:"DATETIME"`
	Laststartutc        time.Time `json:"LastStartUtc" xorm:"DATETIME"`
	Lastendutc          time.Time `json:"LastEndUtc" xorm:"DATETIME"`
	Lastsuccessutc      time.Time `json:"LastSuccessUtc" xorm:"DATETIME"`
}
